//
//  ResturantDetailRes.m
//  Taste
//
//  Created by 徐昊 on 16/9/19.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "ResturantDetailRes.h"
#import "MasterComment.h"
#import "ResturantMore.h"
@implementation ResturantDetailRes

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"mastercomment"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            MasterComment *comment = [MasterComment modelWithDic:dic];
            [array addObject:comment];
        }
        _mastercomment = array;
    }
    if ([key isEqualToString:@"more"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ResturantMore *more = [ResturantMore modelWithDic:dic];
            [array addObject:more];
        }
        _more = array;
    }
    if ([key isEqualToString:@"id"]) {
        _ResturantDetailRes_id = value;
    }
}


+ (NSDictionary *)objectClassInArray{
    return @{@"masterComment" : [MasterComment class], @"more" : [ResturantMore class]};
}

@end
